{% extends "::base.html.twig" %}
{% block body %}
<h1>Software</h1>

<table class="record_properties">
    <tbody>
    <tr>
        <th>Id</th>
        <td>{{ entity.id }}</td>
    </tr>
    <tr>
        <th>Name</th>
        <td>{{ entity.name }}</td>
    </tr>
    <tr>
        <th>Year</th>
        <td>{{ entity.year }}</td>
    </tr>
    <tr>
        <th>License</th>
        <td><a href="{{ path('license_show', {'id' : entity.license.id }) }}">{{ entity.license.name }}</a></td>
    </tr>
    <tr>
        <th>Type</th>
        <td>
            <a href="{{ path('softwaretype_show', {'id' : entity.softwareType.id}) }}">{{ entity.softwareType.name }}</a>
        </td>
    </tr>
    <tr>
        <th>Devices</th>
        <td>
            <ul>
                {% for device in devices %}
                <li><a href="{{ path('device_show', {'id' : device.id}) }}">{{ device.inv }}[{{ device.room }}]</a></li>
                {% endfor %}
            </ul>
        </td>
    </tr>
    </tbody>
</table>

<ul class="record_actions">
    <li>
        <a href="{{ path('software') }}">
            Back to the list
        </a>
    </li>
    <li>
        <a href="{{ path('software_edit', { 'id': entity.id }) }}">
            Edit
        </a>
    </li>
    <li>
        <form action="{{ path('software_delete', { 'id': entity.id }) }}" method="post">
            {{ form_widget(delete_form) }}
            <button type="submit">Delete</button>
        </form>
    </li>
</ul>
{% endblock %}
